package com.gitee.cirnochat.group.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.cirnochat.group.model.enums.GroupMessageType;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 群系统消息表
 * @TableName group_message
 */
@TableName(value ="group_message")
@Data
public class GroupMessage implements Serializable {
    /**
     * 
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 群聊ID
     */
    @TableField(value = "group_id")
    private Long groupId;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 消息类型（INVITE、DISMISS、KICK、PROMOTE 等）
     */
    @TableField(value = "type")
    private GroupMessageType type;

    /**
     * 消息内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 操作人ID
     */
    @TableField(value = "operator_id")
    private Long operatorId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}